const GEEK_TOKEN = 'GEEK_TOKEN'

export const setToken = (token) => {
  localStorage.setItem(GEEK_TOKEN, token)
}

export const getToken = () => {
  return localStorage.getItem(GEEK_TOKEN)
}

export const removeToken = () => {
  localStorage.removeItem(GEEK_TOKEN)
}

// 是否有token 布尔值
export const hasToken = () => {
  return !!getToken()
}
